﻿// This code is released under the BSD license.
namespace PugLib.UnitTest
{
    #region

    using System.Collections.Generic;
    using Microsoft.VisualStudio.TestTools.UnitTesting;

    #endregion

    /// <summary>
    ///This is a test class for AlphanumericComparerTest and is intended
    ///to contain all AlphanumericComparerTest Unit Tests
    ///</summary>
    [TestClass]
    public class AlphanumericComparerTest
    {
        /// <summary>
        ///A test for Compare
        ///</summary>
        [TestMethod]
        public void AlphanumericTest()
        {
            AlphanumericComparer<string> target = new AlphanumericComparer<string>();
            List<string> expected = new List<string> { "1W", "50F", "100F", "100W", "SR9", "SR100" };
            List<string> actual = new List<string> { "SR9", "100F", "50F", "1W", "100W", "SR100" };
            actual.Sort(target);

            for (int i = 0; i < expected.Count; ++i)
            {
                Assert.AreEqual(actual[i], expected[i]);
            }
        }
    }
}